|
cylix2000 wrote: How to make a image button ?
What is that?
Put an image onto a button. Button has the image property. Select an image.
cylix2000 wrote: How to make some rounded corner text field?
You've got to paint it like that.
Jesus Loves <marquee direction="up" height="40" scrolldelay="1" step="1" scrollamount="1" style="background:#aabbcc;border-bottom:thin solid 1px #6699cc">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
I am using VS.NET 2003 / Windows XP. I want to export the data displayed in the datagrid into EXCEL. I have checked that 'Microsoft Excel 11.0 and 5.0 Object Library' is present in Add Reference. Can someone provide code for the same.
With Best Regards,
Mayur
|
|
|
|
|
You can simply use the dataset and write it as xml
<br />
Dim fs As New System.IO.FileStream("c:\myfile.xls", _<br />
System.IO.FileMode.Create)<br />
<br />
'Create an XmlTextWriter for the FileStream.<br />
Dim xtw As New System.Xml.XmlTextWriter(fs, _<br />
System.Text.Encoding.Unicode)<br />
xtw.WriteProcessingInstruction("xml", "version='1.0'")<br />
datasetname.WriteXml(xtw)<br />
xtw.Close()<br />
the above code will write a file c:\myfile.xls
Regards
Mubashir
|
|
|
|
|
Hi Mubashir, thnx for your reply. I used the code provided above. It creates a myfile.xls file in c drive. Since the data size is huge, the file size is 24 mb. However, when I try to open the file, the screen just displays importing data or opening. However, nothing is displayed in excel eventhough I have waited for a long time. Please help me out.
With Best Regards,
Mayur
|
|
|
|
|
|
Hi Abhinav,
I have already gone through the link provided in your reply. However, there are some issues that I have with the steps provided.
I am using VS.NET 2003 / Windows XP / Office 2003
In the following steps,
Dim excelApp As New Excel.Application
Dim excelBook As Excel.Workbook = excelApp.Workbooks.Add
Dim excelWorksheet As Excel.Worksheet = _
CType(excelBook.Worksheets(1), Excel.Worksheet)
I have added a reference to Excel 10.0 Object. However, it displays error message for the above code.
For the line, Dim excelApp As New Excel.Application, the options provided is _Application.
Also for, Dim excelBook As Excel.Workbook = excelApp.Workbooks.Add, there is no workbooks.add property available.
Can you help me out with this. It is very important for me. Thnx a lot for your concern.
With Best Regards,
Mayur
|
|
|
|
|
i did it like this:
Dim excelApp As Object<br />
Dim excelBook As Object<br />
' to Workbook to Worksheet.<br />
excelApp = CreateObject("Excel.Application")<br />
excelBook = excelApp.Workbooks.Add<br />
Dim excelWorksheet = excelBook.worksheets(1)<br />
excelApp.Visible = True
try it
abhinav
|
|
|
|
|
I have a listbox which can multiple select.
How can I get the newest selectItem ?
I means I have already select 2 item, how can I get the last item i selected?
Suppose the user may random select.
|
|
|
|
|
'Declare a form level variable as
Inherits System.Windows.Forms.Form
Private lstLastItem As Integer
'Move the index of selected item of list box into the lstLastItem
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
lstLastItem = ListBox1.SelectedIndex
End Sub
|
|
|
|
|
<br />
lstLastItem = ListBox1.SelectedIndex<br />
SelectedIndex seems always return the smallest one.
Not that Laterest one.
That is when I select index 0 item and then select index 1 item,
It also return index 0 but not the laterest index 1...
anyway, Thank you
|
|
|
|
|
'Declare a form level variable as
Inherits System.Windows.Forms.Form
Private lstLastItem As Integer
'Move the index of selected item of list box into the lstLastItem
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
lstLastItem = ListBox1.SelectedIndex
End Sub
lstLastItem will contain the last index if u want to access the last selected item u may access it as
MsgBox(ListBox1.Items.Item(lstLastItem))
|
|
|
|
|
Hello All,
i have made a windows application in vb.net and developed reports in crystal reports which is in visual studio.
Then i installed my application on 42 different locations. In these 35 locations are generating the printout of the reports from their default printer. But 7 locations are generating this error:CrystalDecisions.CrystalReports.Engine.FormatEngine: "Invalid printer specified."
Can anybody help me how to solve it.
misecprj
|
|
|
|
|
Your best bet is to Google for "Crystal Reports Invalid Printer Specified", and you'll come up with lots of hits, and lots of hints. All you have to do is start reading and see what fits your codes situation.
Here's[^] a freebie to get you started.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
what is the size of Windows form when it is in maximized state, as in the height and width of the form?
With Best Regards,
Mayur
|
|
|
|
|
Form Height and Width Depends on the Screen Setting.
For 1027 x 868
The height = 748 and width = 1032
For 800 x 600
The height = 580 and width = 808
Regards
|
|
|
|
|
Thnx Javed, for 1024 x 768 it is (1036, 780). Thnx A Lot !!!
With Best Regards,
Mayur
-- modified at 0:46 Thursday 19th January, 2006
|
|
|
|
|
Hi everyone I am trying to compare userid i.e, if the user exists I want to display the message.I am getting error when comparing the text in the textbox and the text from the database.Please tell me how to convert the value into string. the code is as follows...
cmd.commandtext="select user from reg"
da.selectcommand=cmd
da.fill(ds,"reg")
for each dr in ds.tables("reg").rows
If textbox1.text=dr.item(0) then
msgbox("UserExists")
endif
next
thanxin advance
yamini
|
|
|
|
|
may be "user" field have null values thats y it will be giving error
Try this:
cmd.commandtext="select user from reg"
da.selectcommand=cmd
da.fill(ds,"reg")
for each dr in ds.tables("reg").rows
If textbox1.text= (dr.item(0) & "") then
msgbox("UserExists")
endif
next
|
|
|
|
|
The data you get from dr.item(0) is of the type Object. That means that you are comparing the values as objects, not strings, and as they are not the same object, the expression never will be true.
Convert the object to a string:
If textbox1.text = dr.item(0).ToString() then
---
b { font-weight: normal; }
|
|
|
|
|
I'm fairly new to programmimg and I'm also a 20-year musician. I'm trying to create a pitch tuning program for when I'm tuning my guitar. I have buttons that when clicked will play the correct pitch and I have images set up to display an image of the corresponding guitar string. I would like for both to occur at the same time, but the audio wave will play first and when its done it then diplays the image. Is there any way to have both occur at the same time? Also, how can I interrupt the audio playback once its begun? Thanks to those who respond. I've tried and read and I can't seem to go in the right direction.
Richard
|
|
|
|
|
You can do one of two things. First, use an asyncronous method of playing audio ( i.e. one where you tell it to play and the app does not wait ), and two - play audio in another thread.
How you interupt the audio depends entirely on how you play it. If you were to use WMP as a control, then you could interact with it. If you use a PlaySound type API then you're out of luck.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
my problem is that,,,,if i check my checkbox in a runtime,it will not appear to the to the datagrid,,,supposed to be there is a check there,,can you help me to solve this problem
neobags
|
|
|
|
|
Im getting System.OverflowException, with a very large number for OwnerhWnd
I have:
<br />
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long<br />
Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long<br />
and in load method of mainform,
<br />
Dim OwnerhWnd As Integer<br />
Dim ret As Integer<br />
Dim hWnd As Long<br />
hWnd = FindWindow("MainForm", "")<br />
OwnerhWnd = GetWindow(hWnd, GW_OWNER)<br />
Anyone tell me whats wrong here?
I want to do that so I can call
ret = ShowWindow(OwnerhWnd, SW_HIDE)
but crashing on line OwnerhWnd = GetWindow(hWnd, GW_OWNER)
thanks
|
|
|
|
|
The .Handle property of a Form is the HWND.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks, instead of all that other stuff, I only needed
<br />
Dim OwnerhWnd As Long<br />
OwnerhWnd = Me.Handle.ToInt64<br />
' Hide from task list:<br />
Call ShowWindow(OwnerhWnd, SW_HIDE)<br />
to achieve what I wanted
|
|
|
|