
techmanbd
Avatar/Signature-
Posts
405 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by techmanbd
-
I have been trying and trying to figure out something with no success, BUT I did find this in a search. SOunds like what you are looking for. http://www.thescripts.com/forum/thread528760.html
-
Yes, sorry there was a misunderstanding on my part. I will look into what you are talking about. For some reason, when I saw taskbar my brain was thinking of the bar at the top of the page of the form.
-
Update: I have worked with my application and have made progress. Here is what I have done. In order to select a menu item, I had to make an event handlers. Here is what my code looks like as far as the popup menu and event handler sub. my statBar code is the same as above revised context menu routine Private Sub conMenu_Select(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles conMenu.Popup If conMenu.SourceControl Is statBar Then conMenu.MenuItems.Clear() conMenu.MenuItems.Add(strDevMenu(1), New System.EventHandler(AddressOf handleConMenuStatBar)).Checked = boolDevConnected conMenu.MenuItems.Add(strDevMenu(2), New System.EventHandler(AddressOf handleConMenuStatBar)).Checked = Not boolDevConnected End If End Sub Here is my sub for handling the event. Private Sub handleConMenuStatBar(ByVal sender As System.Object, ByVal e As System.EventArgs) 'Put whatever code you need here after selecting a menu item. MessageBox.Show("GOT TO EVENT") End Sub
-
Hope this will help you get on your way. Here is what I have done so far. I am using it for the status bar panels. In the status bar properties, the contextmenu item is set to conMenu, the name I gave to my context menu tool. This is the context menu routine Private Sub conMenu_Popup(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles conMenu.Popup If conMenu.SourceControl Is statBar Then conMenu.MenuItems.Clear() conMenu.MenuItems.Add(strDevMenu(1)) conMenu.MenuItems.Add(strDevMenu(2)) End If 'MessageBox.Show("Keeps Going") End Sub When I click on the status bar Private Sub statBar_PanelClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.StatusBarPanelClickEventArgs) Handles statBar.PanelClick If e.Button = MouseButtons.Right Then Dim strStat As String = e.StatusBarPanel.Text strStat = strStat.Substring(0, strStat.IndexOf(":")).ToLower strDevMenu(1) = strStat & " connect" strDevMenu(2) = strStat & " disconnect" End If Here is where I stopped working on it and moved on as I didn't have alot of time and this wasn't an important feature I was making. But what you need to do is when someone selects something in the context menu, to capture what they selected and make a sub to do what you want it to do.
-
You may want to look into the Contextmenu from you toolbox. I have messed with it a little a while back, but I feel that is what you are looking for.
-
Are you in debug mode? They don't work when you are in Release mode.
-
retrieve properties of a file
techmanbd replied to aman729's topic in Directory / File IO / Registry
Look into System.IO.File Type this in your application, hit F1 for the help file on this class. -
This is where I get alot of my icons if U don't make my own(usually my company specific icons). http://iconfactory.com/freeware/icon
-
I would say swap the update command and accept changes. You need to accept the changes before you update the table.
-
I have always used XML file to save data.
-
It was missing in the intellisense. I shut the program down, and restarted and it was there. Another thing I notice, when I am typing the cursor will not follow the typed characters. for instance I type "techmanbd". When I get to the c the cursor stays there, but the hman will type out. Not that it matters, it just threw me off at first.
-
I am currently creating a program in C# using VS2003. I figure the project I am working on is perfect for me to learn C# as the original program was down in Borland C++. I am upgrading as the original is not user friendly. Anyways, I am wondering if this is a bug. I place a listbox on the form called lstAinfo. I saved this as well. if I try and do this.lstAinfo, so I can add an item, it doesn't show up in the list. I have a button called btnExit, and that shows up. I also checked and I do have this setup in the windows designer area.
-
is there the use of addrange for list? Methods.AddRange
-
I haven't had any problems like that either. Are you monitoring the combobox in the thread for a change? and when you select something else, this is when you get the error? Before you start the thread. you may want to try and set "isBackground = true" for that thread.
-
Re: Threading Question SUCCESS it works. thanks buddy. But did have to change this part Do Application.DoEvents() Loop While thrdTest.ThreadState.Running to this Do Application.DoEvents() Loop While thrdTest.isAlive as this would cause the code to keep going and then start the next thread at the same time.
-
Nevermind, I may have found it Private Sub runTestThread(pointerToSub as ThreadStart) I will give that a try and post later for success or more questions. Thanks for directing me in the right direction.
-
Thanks for the reply. That is probably going into the right direction. But I do get an error with that. pointerToSub is what is giving me the error. I get this message 'AddressOf' expression cannot be converted to 'System.Object' because 'System.Object' is not a delegate type. So I probably to to make pointerToSub something other than an object, but can't find what to set it as.
-
First here is my code. Question at the bottom. the sub that starts a test Private Sub startTest() If Me.chckIVFAT.Checked Then runTestThread(NAME_OF_SUB) End If If Me.chckIVFELO.Checked Then runTestThread(NAME_OF_SUB) End If If Me.chckIVDO.Checked Then runTestThread(NAME_OF_SUB) End If End sub the sub to do the thread Private Sub runTestThread(NAME_OF_SUB) thrdTest = New Thread(AddressOf NAME_OF_SUB) thrdTest.IsBackground = True thrdTest.Start() Do Application.DoEvents() Loop While thrdTest.ThreadState.Running End Sub So I don't have a LOT of lines of the thread, I made a sub to run the thread. How can I pass through the name of the sub to make the "addressof" for? I was thinking passing the name of the sub to start as a string, but how can I make sure the thread nows that is the sub I want to start as a thread? That is if that is a way to do it.
-
I thought the express versions had a limit of how long you could use it?
-
How to remove dataset from rdlc report element
techmanbd replied to Puiu's topic in Database / XML / Reporting
Try right clicking on the item you dragged and down at the bottom it says delete. I think that is what you are asking. -
Yes, but it is always 0. I assigned it different numbers before this command, and it brings back that number instead of changing it just to see. I don't think it is doing anything. I haven't been able to work on it the past couple of work days as other priorities have come up. This is the code I took that was done in borland C. I am not a C programmer, but I though the "&" means that it assigns a value to that address? This is where the person assigned the variable unsigned long hMSCAN; The first time I see it used. Status = PassThruConnect(MSCAN, 0, &hMSCAN); Then it is used here to send commands to that box Status = PassThruWriteMsgs(hMSCAN, &TxMsgs[1], &NumMsgs, 100);
-
It returns the same parameter. I am not sure how it is identifying the different devices. I am thinking it is in that DLL. Unfortunately the person that wrote it is no longer around so I can't talk to him, and have asked another guy, but he doesn't know either. Edit: Also I would like to note, I have the GUI interface that the company supplies with these boxes. And their interface it the same way. If I want to interface with 2 boxes, I have to run it twice. If they are doing this as well, I may just be SOL and just write a program, and have a button to start the executable for how ever many I need.
-
Yes I do. This is a sample of the class, there are more dllImports but not needed to see. Public Class McS1Com2 <DllImport("MCS132", EntryPoint:="PassThruConnect", CharSet:=CharSet.Ansi, SetLastError:=True)> _ Public Shared Function PassThruConnect(ByVal ProtocolID As Int64, ByVal Flags As Int64, _ ByRef pChannelID As Int64) As Integer End Function end class Then in my form Dim MCS As NEW McS1Com2 'This is at the top Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim intC As Int64 Dim intCC As Int64 Dim strC As String intC = MCS.PassThruConnect(MCS.Protocol.MSCAN, MCS.PassThruCon_TXFlag.TX_BLOCKING, intCC) strC = "Connect Status: " & intC Me.Label2.Text = strC Me.Label1.Text = intCC.ToString End Sub
-
I have a 3rd party bus communications box and there is a dll that comes with it to speak to this box through the USB port. At one time I could have 3 to 5 of these boxes connected. I would like to just use one form to talk to all these boxes. Here is what happens. I will use 2 boxes as an example. If I run the EXE file, it will talk to 1 of the boxes. If I want to talk to the second box, I have to run the exe file a second time. Now I have been trying to do this with one form so I don't have mutiple executables running at the same time and not having success. Can someone lead me into the right direction? What to look in to? I will still search as well. I have a feeling it has to do with the DLL and assigining a new instance to it for the 2nd box. Also I can't reference this dll through the framework. I have to use the system.runtime.interopservices and the <Dllimport("whatever")> code. Hope this makes sense Thanks,
-
You can check out the sister site for pre .NET here http://www.xtremevbtalk.com/ It has been a long time since I have seen pre .NET