|
Hi I am upgrading VB application. I have few questions after upgrading to
VB.NET
1. I use SelectObject Win32 API which takes Handle to the DC (I currently
use picture box). Error message is "HDC is not a member of
System.Windows.Forms.Panel"
2. All of the Listview controls are upgraded as AxMSComctlLib.AxListView,
but I get an error "Type AxMSComctlLib.AxListView is not defined".
Can you please guide me to resolve these errors.
Thanks In Advance
|
|
|
|
|
I don't know about the first one but if you type "dim AxMSComctlLib as New AxMSComctlLib" should take care of #2.
|
|
|
|
|
1:How we create Input MessageBox in C# Or VB.Net and its set value?
2: How to get Print and PrintPreview dialog box result.
Muhamad Waqas Butt
waqasb4all@yahoo.com
|
|
|
|
|
|
If (MsgBox("Are you sure to delete selected: " & "WARNING: Delete CANNOT be undone!", vbYesNo + vbQuestion + vbDefaultButton2, "Confirm delete!") = vbYes) Then
// Put your code here
End if
|
|
|
|
|
I have a combox i bind it with data table like this.
cbclientid.DataSource = dsclientid;
cbclientid.DisplayMember = "Client_Info.Client_Name";
cbclientid.ValueMember = "Client_Info.Client_Id";
Now when i get value from table through sql reader.
Client Id how i select the value from cbclient(combox);
I am doing this :-
cbclientid.SelectedText = dr2.GetString(2); // Return Client Name
this code not select cbclient name value.
...
Muhamad Waqas Butt
waqasb4all@yahoo.com
|
|
|
|
|
Try this:
cbclientid.SelectedIndex = cbclientid.FindString(dr2.getstring(2))
|
|
|
|
|
There is a treeview, I want to store all of the nodes into a class or structure.
How to do?
|
|
|
|
|
Have read about some macros but never found one wich works?
Anyone knows how to do this in VB.NET ... In C# it seems to be default.
//Maw
|
|
|
|
|
Hi. I am developing a system that uses a computer that has a USB port as input with no keyboard/mouse. After the program scanned the flash drive, the user will now remove it. How can I duplicate the action of clicking the "Safely Remove Hardware" in my program?
Thanks a lot!
|
|
|
|
|
I tried this for days but can't seem to get it. Basically I just need to open a folder. No browsing or dialog box is needed. I just need to open a specific folder(E.g. "C:\Example\") whenever I click the button. I should be able to see whatever files are in there.
|
|
|
|
|
you want explorer to open the folder so you can see it?? you want cmd to display the folder? You want to open a display window in your program that displays the list of files in a folder? Please elaborate your problem.. Also show us some code that isn't working?
David W Johnson
|
|
|
|
|
Thanks very much for all the talent programmers here. I enjoy your codes here very much.
|
|
|
|
|
I can create a new instance for the MS Office app with the shell statement:
Shell("C:\Program Files\Microsoft Office\Office11\WINWORD.EXE ")
but I can not figure out the proper syntax to call a specific word document in a folder.
Shell("c:\Documents and Settings\Administrator\My Documents\Docs\Analysis.doc")
**I still get file not found in my catch block
*It does work with notepad
Shell("notepad C:\Documents and Settings\Administrator\My Documents\Analysis.doc")
Am I missing a project reference, a com object or a import statement?
|
|
|
|
|
Have you tried:
Shell("C:\Program Files\Microsoft Office\Office11\WINWORD.EXE " & """" & "c:\Documents and Settings\Administrator\My Documents\Docs\Analysis.doc" & """")
|
|
|
|
|
I just knew it would take 2 or three sets of quotes...(yeah right)
What does the ampersand do?
|
|
|
|
|
Ampersand concatenates the strings into one string. The """" adds quotation marks, which are required because the file path has spaces.
VB reads the resulting command line as:
C:\Program Files\Microsoft Office\Office11\WINWORD.EXE "c:\Documents and Settings\Administrator\My Documents\Docs\Analysis.doc"
Not sure why you can have spaces in the executable path without adding quotes.
|
|
|
|
|
if you just like to open a .doc file you also can do this by
Process.Start("c:\Documents and Settings\Administrator\My Documents\Docs\Analysis.doc")
|
|
|
|
|
Thanks alot, Process.Start requires less keystrokes to process. I have found a invaluable resource here at the Code Project. Way Cool...
|
|
|
|
|
Hello everybody,
I've cretaed a database application that build tables/triggers/stored-procedures at runtime (Oracle DB 10g).
After all tables created, the application starts creating the triggers and the SPs.
this is small code:
--------------------------------------------------------------------------------
Public Shared Sub CreateTriggers()
Dim Err As String = ""
Dim HasErr As Boolean = False
Dim CmdTmp As OleDbCommand = New OleDbCommand
With CmdTmp
.Connection = oConn
'creating trigger(s)
.CommandText = "CREATE TRIGGER change_status AFTER INSERT ON invoices " & _
"REFERENCING NEW AS newRow FOR EACH ROW " & _
"BEGIN update orders set orders.order_status='Close' where orders.orderID = :newRow.orderID; " & _
"END change_status;"
.CommandType = CommandType.Text
Try
.ExecuteNonQuery()
Catch ex As Exception
HasErr = True
Err += ex.Message + Chr(13)
End Try
'creating stored-procedure(s)
.CommandText = "CREATE OR REPLACE PROCEDURE Add_Inventory(SID varchar2, IID varchar2, Amount Number ) " & _
"IS " & _
"BEGIN " & _
"Insert Into Inventory(StoreID, ItemID, Inv_Amount, Inv_DateM, Inv_DateY) " & _
"Values(SID, IID, Amount, To_Number(To_Char(SysDate, 'MM')), To_Number(To_Char(SysDate, 'YYYY'))); " & _
"END;"
Try
.ExecuteNonQuery()
Catch ex As Exception
HasErr = True
Err += ex.Message + Chr(13)
End Try
...
...
--------------------------------------------------------------------------------
now, I dont get exceptions when the app runs, but the triggers\SPs were NOT created..
I also created tables at run-time and there is no problem..the tables have been created...
There is no problem creating the triggers\SPs from sqlplus with the same user
so I dont think that is a permissions problem
(when I copy the trigger/SP code & paste it in sqlplus, I get the message(s)
Trigger created
or
procedure created )
I also CAN delete trigger(s)\SP(s) from the application but CANNOT create them..
what could be the problem?
please help me out here..I'm stuck...
Thank You
RoyRose
|
|
|
|
|
he y don't u try stored procedures instend of command text
|
|
|
|
|
Hey,
Well, I guess this some kind of bug that OleDbCommand cannot create trigger or SPs but when I changed the objects to Oracle object (OracleConnection, OracleCommand, OracleDataAdapet, OracleTransaction..)
Everything works!
Thank You
RoyRose
|
|
|
|
|
How to make our winform application custom skin like yahoo change its skin base on different images and ini file setting.
I mean Form Title Window and whole skin color change shape does'nt matter.
If any Body have any Idea. Please Tell Me
Muhammad Waqas Butt
waqasb4all@yahoo.com
Muhamad Waqas Butt
waqasb4all@yahoo.com
Muhamad Waqas Butt
waqasb4all@yahoo.com
Muhamad Waqas Butt
waqasb4all@yahoo.com
|
|
|
|
|
Muhammad Waqas Butt wrote:
Muhammad Waqas Butt
waqasb4all@yahoo.com
Muhamad Waqas Butt
waqasb4all@yahoo.com
Muhamad Waqas Butt
waqasb4all@yahoo.com
Muhamad Waqas Butt
waqasb4all@yahoo.com
What was your email address ?
Basically, make all your controls owner drawn, and get the paths to the images to draw on them from a config file.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for help.
My E-mail Address is : waqasb4all@yahoo.com
But how we do this to form title bar (Close,Minimize and Maximize Buttons) Shape.?
I mean as Stlye Xp do different theme in our windows xp change Folder Title bar colors and stlye.
Do you have any example to do in C# or VB.Net?
I just do to form title bar other controls does not matter.
Please Help me. and again thanks for your help.
Muhammad Waqas Butt
waqasb4all@yahoo.com
Muhamad Waqas Butt
waqasb4all@yahoo.com
|
|
|
|