faulty.lee
Members-
Content Count
496 -
Joined
-
Last visited
Everything posted by faulty.lee
-
Hi miCRoSCoPiC^eaRthLinG, I do agree with you, in fact i tries to avoid the VisualBasic namespace as much as possible. But looking at the situation, i think visualbasic.collection is much suited to get started. Maybe after turbopowerdmaxsteel got used to it, then he can try the actual more powerful collectionbase class. turbopowerdmaxsteel, one thing to take note though, the starting index is different for visualbasic.collection and the collectionbase class. Visual basic one started with 1, for backward compatibility, where as collectionbase or system.collections starting with 0, similar to array EDIT : You can also inherits the visualbasic.collection. my last comment actually referring to inheritance. Sorry for the mistake Regards faulty
-
How you relate $database to $ll_conn??? You can try $ll_res=mysql_db_query("londonlink", $ll_sql)without the $ll_sql, that way the function will just use the last mysql connection of that session
-
Did you call mysql_connect() for $ll_conn? if (!$ll_conn = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')) { echo 'Could not connect to mysql'; exit;} Sounds like you miss the above coding
-
You forgot your comma at the line before that (87) GetSQLValueString($area_code, "text") <-- missing comma
-
It's a parse error, meaning something wrong with the source code, not even able to execute. At which line is the error. Normally a line number is show, and that's important to help locate the error. unexpected T_STRING means that there shouldn't be a string followed by the whatever line of code. Maybe you miss out a semi colon, or a bracket or something else
-
Glad it helps. Keep up EDIT: Try to read some books on this, it help understand more bout the basic of it, that way you can program more efficiently
-
You can use Microsoft.VisualBasic.Collection. It has a built in key access for it's item. If you need to implement into your own class then you can try this Public Class Responses Private _responses As Microsoft.VisualBasic.Collection Public Sub New() Me._responses = New Microsoft.VisualBasic.Collection End Sub Default Public ReadOnly Property Item(ByVal Key As String) As String ' You can define the default type for this property ' Only readonly as per default of Collection.Item Get 'You need to cast it if you have turn on Strict Mode Return CType(Me._responses(Key), String) End Get End Property ' This is to ease the adding function ' In case you have a different type you want to store Public Sub Add(ByVal Value As String, ByVal Key As String) Me._responses.Add(Value, Key) End SubEnd Class to use it Dim a As Responses = New Responses a.Add("testing", "key1") MsgBox(a("key1")) You can add as many member function as you like to customize or overrides the original base function. I didn't override the Add function exactly, but you should override all of "Add" if you want to implement any one of it, that way is to avoid confusion or improperly accessing the incorrect base function.
-
Hi, Ok, i've tested. Just this code you posted earlier works fine for me frmChild.MdiParent = mefrmChild.show Sorry for giving you the wrong info on Controls.Add(). I seldom use MDI for my software. I find it confusing. Anyway, you also need to enable "KeyPreview" (Misc) for your main form for the keyboard event to work properly. After seeing you code, i do have a few comment for you Dim response As Microsoft.VisualBasic.MsgBoxResult Use this instead of interger, that way your code of If response = 6 Then can be written as If response = MsgBoxResult.Yes Then which is a lot of easier to read and debug The 2nd thing is try to use as much OOP strategy as possible. One of it is keep all this code that show your MDI Child in side one function, then call the function from those menu and key event. That way, it's easier to maintain the code. If you need to change the way your Help Windows appear, just change that function. All those event that call the function gets the changes. f not, you'll have to look through all your codes to make the changes, and you might miss it, trust me, it does, all the time Instead of Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown Dim response As Microsoft.VisualBasic.MsgBoxResult Select Case e.KeyCode Case Keys.F1 MsgBox("You asked for help") Exit Sub Case Keys.F2 frmWebHelp.MdiParent = Me frmWebHelp.Show()..... more code Private Sub WebHelpToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WebHelpToolStripMenuItem.Click frmWebHelp.MdiParent = Me frmWebHelp.Show() End Sub You change it to Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown Dim response As Microsoft.VisualBasic.MsgBoxResult Select Case e.KeyCode Case Keys.F1 MsgBox("You asked for help") Exit Sub Case Keys.F2 ShowfrmWebHelp()..... more code Private Sub WebHelpToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WebHelpToolStripMenuItem.Click ShowfrmWebHelp() End Sub Private Sub ShowfrmWebHelp() frmWebHelp.MdiParent = Me frmWebHelp.Show() End Sub VB.Net implemented a lot of OOP features compare to VB6, it's totally re-engineered, thus why not use that to our fullest All the best Regards Faulty
-
Hi, sorry for the delay, quite busy with some customer supports lately. Btw, you code is done using visual basic 2005 right? I'm only using 2003. Installing 2005 now. If it goes successful tonight, i'll get back to you tomorrow Regards & Happy New Year
-
Sorry, do you mind to attach a more complete codes, cause i need to see what went wrong. The one you attached is just the button event. I can't see the property of those forms. If possible, you attach the .vb file of frmMain and frmChild
-
Do You mind to zip your code and attach it here?
-
Controls.Add has to be call before you call "show()". And about the error, what error was it? I remember you were saying that it's not focus, but you never mention any error. You have to be clear with your term, or else others will get confuse. If you don't mind, can you explain a bit bout what your code is suppose to do, and so far what have been achieved and which part is not working as you intended it to. With an overview, it would be easier to solve you problem
-
I don't think that's enough to add it to the parentform, and i never use that. Btw, where did you put that 2 line of code? For my case, i put this in the frmMain frmMain.Controls.Add(frmChild) You should do the initialization before adding the control to the parent, including calling MdiParent = me. How did you child form appear with respect to the parent form? If it appear just like another normal form or dialog, then it might not have been made a child.
-
That might complicate things. It won't help or could make thing worse. How you add your child form to the frmMain? For me i use frmMain.Controls.Add(frmChild) when you initialize your child form. That way, the child won't appear as a separate form, and stealing the focus. There could be other way to do that which i'm not aware of.
-
If you're stepping through the code, very likely that your frmMain will be out of focus. One way is try not to switch focus when the debugger steps in, then the focus sequence will be switch back after you continue the code execution. Btw, frmMain should be in focus in order to receive the event. Is your child form really configured as MDI child? if not it will actually steal the focus also.
-
Since you use show(), the form might be minimized or it doesn't get focus. Or could be an exception. You can try add and break point at ->Select, then step through the code when you press the F1. That way you can find out what's wrong.
-
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown Select Case e.KeyCode Case Keys.F1 'F1 Case Keys.F5 'F5 Case Keys.F6 AndAlso e.Shift 'Shift + F6 End Select End Sub you can also use If...else...end if. I prefer select cause easier to add more later on
-
For F1 and those non system key combination, you can use KeyPress or KeyDown event. Keydown wuld be better, since it send the event as soon as the key is pressed. keydown need to wait for the key to be release before sending the event. And this only works when the form has the focus For system key combination like ctrl+alt+del, you'll need to use SetWindowsHookEx and WH_KEYBOARD_LL. Unless you have previous experience in calling external dll and using callback function. I don't quite recommend using this, as it might cause more problem than you originally faced. If you really want, i've a pre built class(took me more than 1 month to make it work) for this. I can post the example here. It will only works in win2k and above. I need it cause i need to detect keypress even when the form is does not have focus or when i app is using tray icon
-
Hi,Good to hear that. Glad it helps. Anyway, always try to isolate the problem one by one, then you can easily nail it down.Regards
-
Personally i don't like to use ASP/ASP.Net because of it's dependency on windows, and having certain problem or limitation with IIS. If referring to ASP.Net, it's powerful indeed. For non web based application, i like to use vb.net. I get to roll out the application in the shortest possible time comparing to other languages. ASP.Net is the same. But there's always a misunderstanding regarding VB.Net/ASP.Net of it's "Visual Basic like" nature. " Visual Basic like" doesn't mean it's deficient. For the old VB6 or ASP, yes, that might be true. But the newer VB.Net and ASP.Net, they're powerful. The most notable point is the short development time. Sometime, even if i wanted to write something in other languages, i would choose do it in vb.net first , just to prove the concept, then copy that concept over to what ever language that i prefer later. That really help save a lot of time. Since I don't like ASP.Net (even though I love VB.Net), so, I actually prefer php due to it's cross platform compatibility, speed, simplicity, and it's Free! For connection to MySQL, php is simpler. Please correct me if i'm wrong. In, ASP.Net, you can't reuse the same connection for different query at the same time. For example, if you're trying to loop through a SELECT query, then trying to use the same connection to do some UPDATE in the loop, it will throw an exception. I've been facing that in .Net (VB.Net & C#). Where as PHP doesn't have such limitation.
-
Hi,I have had the same idea as you. I did attempted last time when developing a home security project (commercial one). But the result is very bad. I was using Microchip's PIC18F series and IrDA tranciever. Manually code the pulse receiving and transmitting. The timing is really hard to decode.What i did was to capture the pulse timing (carrier, pulse to pulse), then try to figure out the code that's sent by the remote control. The difficult part is that different model of remote control uses different pulse timing. A series of pulses representing a bit. Need to study all these before you can proceed. I only manage to get it to learn a JVC remote (one button only), but not consistent. My case is a bit more difficult, cause i also need the mcu to do other things as well at the same time. If you dedicate it to decoding IR signal, then maybe it's easier. The project i was developing was scrap later. The IR part is actually scrap a lot earlier before the project ended, hehe.My advice, if you want to do that, you should try the using the IR receiver(3 pin), not IrDA or IR sensor (don't walk my path, and don't reinvent the wheel). Using IrDA or IR sensor, you'll need to manually detect and filter the carrier signal, it's around 38kHz (depend of model), thus that alone will drain all the mcu's processing power. Those 3 pin IR receiver will actually demodulate the carrier and give you bit by bit pulse, then you just have to measure the timing of the pulse.Sending is easier, you can use the built in PWM to generate the 38kHz, then just pulse it according to the timing you receive.Let me know if you're still interested, i'll try to dig my history on those info. Might be a lot later, cause i'm still very damn busy this and the coming week.Good Luck
-
Hi Niran,Can you upload the working page (myfilelocation.aspx) and another non working one here?We'll need that as reference point to test.Regards,Faulty
-
You meant out of maybe a few pages you've tried, only that page works? Can you upload the working page and another non working one here? And also your system software specs, like windows' version, service pack, IIS setting. I'll try to take a look in the coming week, cause right now i'm quite busy with my work. Or at least with those information, others can help also. So please be patient. Regards Faulty
-
Can you test running some simple codes and see if it works. Just to confirm that the basic things works. There some link here for you to refer. http://www.w3schools.com/asp/showasp.asp?filename=demo_text http://www.w3schools.com/asp/asp_examples.asp If you can confirm that the basic things actually functioning, then we can move on to more advance troubleshooting Good Luck