|
hi i have a prob using the winsock activex control in c#.net. everytime i drag it on the form builder i get a msg sayin u do not have a license to use this control. what do i do? pls help
c#psyco
|
|
|
|
|
|
I have a mail merge document that I am automating to pull data then print to postscript. The document ends up being converted to a .pdf and emailed to the user. However, I am having a problem where the doc is losing the data connection during the process.
Specifically the doc is saved with a reference to a local .xls file for its data. Prior to running the VB.NET process, the doc can be opened directly several times and each time it will ask to connect to the .xls file. I will then start the VB.NET process and it will run, creating the .pdf without the updated info. When returning to the original doc, it no longer asks to reconnect to the .xls file and I am forced to attach it again.
Any thoughts? Could it be a permissions issue?
Here is the Print source. Pretty straight forward.
Private Sub PrintReport()
Dim WordApp As Word._Application
Dim wordDoc As Word._Document
Dim iReportID As Integer
Try
Select Case Inventory.Profile
Case "YUD"
iReportID = 1
Case Else
iReportID = Inventory.Profile
End Select
m_sTemplateName = GetReportName(iReportID)
TextBox1.Text += DateTime.Now.ToLongTimeString & ": Generating Report..." & vbCrLf
TextBox1.Refresh()
Dim i, j As Integer
Dim pages As String
Dim fullpath As String = m_sInPath & m_sReportName
WordApp = New Word.Application
If File.Exists(m_sRoot & "reports\" & m_sTemplateName) Then
TextBox1.Text += DateTime.Now.ToLongTimeString & ": Opening document: " & m_sRoot & "reports\" & m_sTemplateName & vbCrLf
TextBox1.Refresh()
wordDoc = WordApp.Documents.Open(m_sRoot & "\reports\" & m_sTemplateName)
Else
TextBox1.Text += DateTime.Now.ToLongTimeString & ": File: " & m_sRoot & "reports\" & m_sTemplateName & " does not exist. Please correct the problem and restart the application." & vbCrLf
TextBox1.Refresh()
btnEnd.PerformClick()
End If
'wordDoc.SaveAs(fullpath)
'pages = wordDoc.Bookmarks.Item("Print").Range.ComputeStatistics(Word.WdStatistic.wdStatisticPages)
'wordDoc.PrintOut(background:=True, range:=4, outputfilename:=fullpath, pages:="1-" & pages) ' named after USERID
'Delete file if exists
If File.Exists(fullpath) Then
File.Delete(fullpath)
TextBox1.Text += fullpath & " exists. File deleted." & vbCrLf
TextBox1.Refresh()
End If
'Write out new file
pages = wordDoc.Bookmarks.Item("Print").Range.ComputeStatistics(Word.WdStatistic.wdStatisticPages)
wordDoc.PrintOut(background:=True, range:=4, outputfilename:=fullpath, pages:="1-" & pages) ' named after USERID
wordDoc.Close(True)
wordDoc = Nothing ' close doc
WordApp.Quit()
WordApp = Nothing ' close word
Catch ex As Exception
TextBox1.Text += DateTime.Now.ToLongTimeString & ": Process Failed in PrintReport" & vbCrLf
TextBox1.Text += ex.ToString & vbCrLf
TextBox1.Refresh()
EmailError(ex.ToString())
btnEnd.PerformClick()
'btnStart.PerformClick()
End Try
End Sub
CitizenSoldier
|
|
|
|
|
Hello all,
I have an ASP.net page that uses an "asp:DataGrid" tag that is populated by a System.Data.DataSet object. Data is sorted via a "sort_value" field in the SQL table.
Until now, this page has just been for the display of data. Data entry is handled via a separate system.
Now, I need to add the ability to change the order of the data records from this screen. (Via changing the underlying "sort_value" field...)
What is the best way to do this in VB.net?
The UI needs to implement a "move up", "move down", "move first", and "move last" button/link next to each data row on the paged display.
Any ideas?
Thanks for the help,
David
|
|
|
|
|
|
It would be better if you posted this in the ASP.Net Forum. The asp:Datagrid is not a VB.Net object and that forum has more knowledge of the control. Or try search articles
|
|
|
|
|
|
hi, i had found many example of speech sdk 5.1 that implemented in vb 6. may i know will speech sdk 5.1 work with vb.net?
beside that, i had tried to code text-to-speech program with vb.net. it work but I not sure does speech recognition (SR) will work in vb.net cox i not capable found any example for it in internet!
By the way, if SR is working in vb.net. will i have to learn XML for coding SR?
pls reply me cox i SR is the main core module in my project.....
thanks![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Hello,
I have tried the Speech SDK 5.1 with Visual Basic .Net 2003, and I was able to get text-to-speech working. I haven't tried anything else with it due to recently reformatting my hard drive.
I have never tried speech recognition, so I am not sure.
I hope this helps,
Programmer2k4
My sig:
"It isn't a bug, it's a feature I didn't know about." - Programmer2k4
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
Oops, Programmer2k4 is now old...I should have thought about that a year in advance.
|
|
|
|
|
Hello,
I want to close internet explorer when i click on button. can any body give me a hint to do that.
Thanks
Ali Alaradi
|
|
|
|
|
use platform invoke "pinvoke" the API function FindWindow to get the handle of the specific window you want to close, and then use the API function SendMessage with the parameters as your handle from FindWinow and the WM_CLOSE constant which equals... 0x0010. I did the introp code for you below...
private public const UInt32 WM_CLOSE = 0x0010;
[DllImport("user32.dll")]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam,
IntPtr lParam);
I would call it something like this..
SendMessage(handleFromFindWindow, WM_CLOSE, IntPtr.Zero, IntPtr.Zero);
/\ |_ E X E GG
|
|
|
|
|
thanks, can you send to me vb code
Regards
Ali Alaradi
|
|
|
|
|
|
i need a help for my problem...
problem is.... i want to use animation in developing my system project by using Visual Basic....anyone who can help me to solve my problem...please help me....
thank you,,,
|
|
|
|
|
Ok VB (I assume you mean Visual Basic 6 and not VB.Net) isnt the best choice if you want to make animations. I would even say its one of the worst choices you can make regarding your problem.
To answer your question you have to give some details of want you want to do. Sprites? Videos? There is a wide range of possible animations. Some will probably work good under VB - some will be very hard to code.
|
|
|
|
|
HI,
I am facing this problem in my vb.net appliaction.
I have put the exe on the client's PC after installing the framework.
The Application is scheduler base. The application works fine for
couple of hours and then gives error "CLR error".
After comiling the application again and putting the new exe back on the client there is no error but only for next couple of hrs..
please help
sk
|
|
|
|
|
Just "CLR error"??? There has to be some more information.
Do you really have to compile a different exe (this sounds strange to me) or can the other one just be restarted?
|
|
|
|
|
First, what's the error? All you've told us so far is "It's broke!"
Sounds like a resource leak to me. Are you Disposing all of your objects that wrap unmanaged resources?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i need a help for my problem...
problem is.... i want to use animation in developing my system project by using Visual Basic....anyone who can help me to solve my problem...please help me....
thank you,,,
|
|
|
|
|
Dim GoingUp As Boolean 'GoingUp stores current direction
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
GoingUp = True
Timer1.Enabled = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
GoingUp = False
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If GoingUp = True Then
'move picture box toward the top
If PictureBox1.Top > 10 Then
PictureBox1.Location = New Point _
(PictureBox1.Location.X - 10, _
PictureBox1.Location.Y - 10)
End If
Else
'move picture box toward the bottom
If PictureBox1.Top < (Me.Size.Height - 75) Then
PictureBox1.Location = New Point _
(PictureBox1.Location.X + 10, _
PictureBox1.Location.Y + 10)
End If
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
|
|
|
|
|
I have a basic form with one button and two textbox's txtusername and txtpassword. What dose the code look like to make this work. "O" yea and how do I verify with a picturebox that the connection has been made?
|
|
|
|
|
If I create a Structure and assign an array to it, is there any way to search for the value in an array and return the structure name? I am sure that the name is associated with the array index but I don't know what property it has.
As a simple example...
Public Structure MyStructure
dim A as String
dim B as string
dim C as string
End Structure
Public myArray(0) As MyStructure
myArray(0).A = "Bill"
myArray(0).B = "Tom"
myArray(0).C = "Joe"
Is there a way to loop through the array to find the value "Bill" and return
whether it is contained in A, B or C?
I am actually trying to populate an array with values from fields on a form.
The field names are the same as the Structure names. So I could set the values
by comparing the names.
Thanks
Dennis
|
|
|
|
|
Hello I am writting a scheduling program for my work and am almost finished but am stuck at a very important part. I am a new programmer so if anyone could help I would greatly appreciate it!!!
I have made a simple DB in MS Access with fields such as:
First Name, Last Name, Address, Phone, Repair Type, Repair Time, Repair Date, Repair Tech
In my vb.net program I can type in all the customers info like names, phone and address, also can type in the repair time and date and repair tech. Then it sends that information to my DB.
What I am stuck on is I need to be able to open a different form, type in the date and the type of repair it is (repair or replacement) and search my DB for these strings. Then the most important part is I need to take those listings and print them in a neat organized format all on one page so my repair techs can print out there schedules for that day. I need to keep the different records in my DB grouped when I print them into my form, if that makes sense. I have spent hours and hours searching high and low for anything on how to do this and have found nothing. If you can please help me you can also contact me through email. I would GREATLY appreciate any help!!!!!!!! Thank you in advance.
Jon
myjunkmail94@hotmail.com
|
|
|
|
|
i'm not sure what you are asking if you are just wanting to add a print dialog to your form so it will print your adjusted data i'm just not sure what exactly because i connnot see your form and to save myself from sounding too stupied cuz i am also new at this can you not do a StreamReader on a form 2 with a print dialog here is a site i found with data base code samples
http://www.microsoft.com/downloads/details.aspx?familyid=87951cb9-5aeb-4f46-9bf0-2b3e3664be77&displaylang=en[^]
damn that is a long site address copy and past that and try those samples see if u can get what you are looking for
|
|
|
|
|
Sounds like you need a report to print based on data selected from the database. Do you know how to write database queries (SELECT somehting FROM TABLE)
<br />
<br />
SELECT First Name, <br />
Last Name, <br />
Address, <br />
Phone, <br />
Repair_Type, <br />
Repair_Time, <br />
Repair_Date, <br />
Repair_Tech<br />
FROM <br />
TABLE_NAME<br />
WHERE <br />
Repair_Type = (repair or replacement)<br />
AND <br />
Repair_Tech = Tech_Name<br />
The rest depends on what method you are using to execute the sql are you using a dataadapter, sqldatareader, etc... Loop thru the records and write them to a file or a richtext box then print it.
I suggest an ADO.NET or ODBC.NET book
|
|
|
|