|
I'm sorry for this very noob question, but how to create dataset or data source at runtime ?
Thank you for replying so fast
WiL
|
|
|
|
|
shiroamachi wrote: but how to create dataset or data source at runtime ?
By data source I just mean a source of data like SQL Server, Access, dBase, etc.
To create a dataset look at the code that visual studio generated for you when you added the dataset and data source in the designer. Alternatively, just about any tutorial on ADO.NET will show you the various ways in which you can create DataSets
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
hi,
how can i add the user shortcut keys at runtime in the applicaion
FAILURE is the first step towards SUCCESS
|
|
|
|
|
try the following code....
' Appends a shortcut key to the caption of a menu item.
Public Sub AddMenuShortcut(Menu As Menu, Shortcut As String)
Menu.Caption = Menu.Caption & vbTab & Shortcut
End Sub
This code fragment adds shortcut keys to commands on the Edit menu:
Private Sub Form_Load()
AddMenuShortcut mnuEditUndo, "Ctrl+Z"
AddMenuShortcut mnuEditCut, "Ctrl+X"
AddMenuShortcut mnuEditCopy, "Ctrl+C"
AddMenuShortcut mnuEditPaste, "Ctrl+V"
AddMenuShortcut mnuEditDelete, "Del"
End Sub
FAILURE is the first step towards SUCCESS
|
|
|
|
|
How I can create a button in ie toolbar.
I want Add Link to ie Toolbar when clicked on link ,go to
<www.your-site>by vb programing.
Is it possible?
Signed By S.E
|
|
|
|
|
You mean u click the button in internet explorer toolbar to link to vb programming.
|
|
|
|
|
Dear Ramani.r
Yes, I want add one button in internet explorer toolbar,then when click the button be link.
if I need the component for project?
I hope I have made my self clear
any suggessions please.
thaks for your reply.
Signed By S.E
|
|
|
|
|
Hi all,
I am new to this forum so please bear with me until I learn how things are done here.
I am trying to write a “VB-6” program where the user can click on a picture of a part and the program then opens an “Excel” price list for them. I used a transparent text box over the picture. You can start the program, click the picture, and an “Excel” window opens with the proper line highlighted. Then, if you close the “Excel” window and try to click on the picture again, the program balks. Part of the “Excel” window appears but it is empty. The program doesn’t crash. It just refuses to show the “Excel” sheet again.
This is the code that I used:
Dim AppExcel As Excel.Application
This sub sets the focus on the picture so the scroll bar doesn’t blink.
Private Sub Form_Activate()
p4l80e.SetFocus
End Sub
This sub tells the program to open “Excel”.
Private Sub Form_Load()
Set AppExcel = CreateObject("Excel.Application")
Workbooks.Open FileName:="D:\K and D (152598).xls"
End Sub
This sub makes “Excel” visible, finds the proper row, and highlights the entire row.
Private Sub lbl034_Click()
'On Error GoTo erh
AppExcel.Visible = True
Cells.Find(What:="34034b", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
'Highlights the entire row.
If IsEmpty(ActiveCell) Then Exit Sub
On Error Resume Next
If IsEmpty(ActiveCell.Offset(0, -1)) Then Set LeftCell = ActiveCell Else Set LeftCell = ActiveCell.End(xlToLeft)
If IsEmpty(ActiveCell.Offset(0, 1)) Then Set RightCell = ActiveCell Else Set RightCell = ActiveCell.End(xlToRight)
Range(LeftCell, RightCell).Select
Exit Sub
erh: MsgBox Error(Err)
End Sub
This is a different attempt at the above code with a different part number. It will work the first time around also. Second attempt, it also will not respond.
Private Sub lbl070_Click()
On Error GoTo erh
'Set AppExcel = CreateObject("Excel.Application")
Workbooks.Open FileName:="D:\K and D (152598).xls"
Cells.Find(What:="34070e", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
AppExcel.Visible = True
Exit Sub
erh: MsgBox Error(Err)
End Sub
The following code works fine. It just controls the scroll bar to move the picture of the parts to be selected.
Private Sub scr_Change()
On Error GoTo erh
p4l80e.Top = scr.Value
' p24L80E.Top = scr.Value + 12500
erh:
End Sub
Private Sub scr_Scroll()
Call scr_Change
p4l80e.SetFocus
End Sub
I am FAR from a pro. at this. I just taught myself from books that I bought so I might not understand a reply unless it’s kept pretty simple and straight forward.
Thanks in advance, Garner
hi,
just close the workbook and also quit the excel application before exiting the Sub routine.
Paritosh
Hi again & thanks to Paritosh,
I thought that this was the problem but I haven't figured out how to fix it. If I use a "close" event in the sub that shows the "Excel" workbook, the workbook flashes on the screen and back off before you get to look at it. I tried to put it in my main form "activate" sub and that didn't work either. I need this to happen automatically as the user closes the "Excel" window so they can just click on another part of the picture.
Could you give me an idea of what the code would look like and what sub to put it in? Like I said, I'm "self-taught" in "VB" so my teacher isn't the sharpest tool in the shed.
Thanks again, Garner
|
|
|
|
|
Is it possible to create multiple websites on windows 2003 servers with VB.NET ??
I can't seem to find some material on this ...
// Dammark
|
|
|
|
|
What do you mean?
Based on the "face value" meaning of your question, the answer is common-sense, of course it's possible. But, I could be misunderstanding the question.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
I need anyone of you guys to give me a brief idea as to how i can do the communication with a tracker and handle a Bittorrent Client with it. Any suggestions or ideas are welcome. PLz i need this info for my Project. Help me out Guys. Or can anyone of u actually write a library to handle all the network management. That would be asking for too much but its worth a shot. Thanx again and forgive my ID. PLz start registrations, i'll make a good ID. Thanx. Cya. Bye. Reply soon at devraj_raut@yahoo.com
Devraj Raut!!!
|
|
|
|
|
Forgive my id ? That's a ripper. Why don't you change it ? If you can't work out how to navigate the site, then perhaps even VB is going to be too complex for you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: Forgive my id ? That's a ripper.
I think that is because Dave ripped into him earlier[^] about it.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Yeah, I saw that. It doesn't really help tho, does it ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Why would someone even pick that name in the first place is beyond me. He's a registered user, so I have no idea what he's talking about as far as "turning on registrations".
So, is anyone going to bail him out of his "deadline" problem? It would seem that he'll spend 2 months on the UI, and some other sucker will spend that time doing the "real" work. Does this sound familiar to anyone?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Just FYI, this ID is one registered for bugmenot.com (a great site)
|
|
|
|
|
And that means what to me? Should I be impressed with something?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am using VB .NEt windows forms.
I have a form with tab control ( 2 tabs)
Tab1 - has a list box of some ids.
tab2 - has grid which populated based on the selected id in tab1 listbox. The grid is populated by calling a stored proc and using filldataset to get a dataset and grid.setdatabinding(ds,tablename).
It seems to work for several times, after switching tabs several times, the application just shuts down, no error message, nothing.
How do i trap what is happening?
Need help on this. Thanks!
vk
|
|
|
|
|
|
I do have a try..catch block in tabindex changed event and there are no errors. And i am runnign the app in debug and the program exits with code 0.
Also, i would like to add additional info.
The startup form is the MDI form and the login form is opened using showdialog(me) in mdi formload.
If i make the login form the start up form and on click of OK on the login form, if i open MDI using objMDI.show and hide the login form, the application does not shut down.
??? Please , this is really urgent. Any help on this would be greatly appreciated.
I am using Visual Studio 2003 and microsoft .net framework 1.1
Thanks.
vk
|
|
|
|
|
Hello all!
I'm using the SDK API for MS Encoder (VB interface) and would like to record dual audio inputs; in other words the sound card output on one audio channel, and microphone input on another audio channel... does anybody know if this is possible/relatively easy?
Thanks
Dale
"It should just work"
|
|
|
|
|
Here is the problem. I would like to access the textbox of another application. To read its contents to automate the input into a seperate application. I was attempting to use the Process.GetProcesses...then loop thru the Control.Collection but I was having prob.
Any help on how to do this would be appreciated.
Thanks Pat
|
|
|
|
|
pjadams225 wrote: then loop thru the Control.Collection
Won't work. You can't cast a foreign app's controls to a .NET control type. You have to enumerate the windows in the foreign app until you find the control you're looking for. You'll then have it's window handle, to which you'll need to send a WM_GETTEXT message. The return you get will be a pointer to the string of text.
There is practically nothing in the .NET Framework Base Class Library that will help you with this, except for some things in the Interop namespace.
The technique is demonstrated in this[^] article. The code is in C++ though. I can't find any VB.NET examples.
[EDIT] Whoops! Wrong link! [/EDIT]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 14:08 Thursday 5th January, 2006
|
|
|
|
|
In my Crystal report I want to reset the page numbers after the group band value changes. In the group band footer I changed the ResetPageNumber property to True but the page numbers never reset. What do I need to do in order to get this to work?
Thanks for any help in this matter.
|
|
|
|