|
It's about 5 lines of C++ on a system with GDI+ available, perhaps you could make one ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Can any one tell me the consequences when this devenv.exe gets corrupted due to which type of controls.
Rekha
|
|
|
|
|
What? Would the program itself get corrupted just because you use a specific control in the designer? Do you have any source to something that points in that direction?
---
b { font-weight: normal; }
|
|
|
|
|
Hi, this is how i open a report inside VB6
Sub CreateReport(SQL As String, MyConnection As Connection, ReportPath As String, _
ReportTitle As String, OpenMethod As Integer)
Dim crApp As New CRAXDRT.Application
Dim crRep As New CRAXDRT.Report
Dim Rs As New ADODB.Recordset
On Error GoTo Err_Proc
With Rs
.CursorLocation = adUseClient
.Open SQL, MyConnection, adOpenKeyset, adLockReadOnly
.ActiveConnection = Nothing
If .RecordCount > 0 Then
Set crRep = crApp.OpenReport(ReportPath, OpenMethod)
crRep.Database.SetDataSource Rs
' crRep.Database.LogOnServer "C:\SUKI\Support\crystal\Pdlsql.dll", gStrServer, gStrDatabase
crRep.ReportTitle = ReportTitle
With frmReportViewer
.Caption = crRep.ReportTitle
.WindowState = vbMaximized
.CRViewer.ReportSource = crRep
If OpenMethod = 0 Then 'print directly to printer
crRep.PrintOut False, 1, True
Else
.CRViewer.ViewReport '1=show print layout to user
.Show vbModal
End If
End With
Else
MsgBox "Record(s) not found.", vbExclamation, App.Title
End If
.Close
End With
Set Rs = Nothing
Set crRep = Nothing
Set crApp = Nothing
Exit Sub
Err_Proc:
Call ErrMsg
End Sub
Am i forgetting something cause my report is not working. "physical database not found" is always its error.
geboy
|
|
|
|
|
Hi
If you remove the line .ActiveConnection = Nothing then you problem may get solved
Tushar kothari
|
|
|
|
|
Hi, im having problem with crystal reports 8.5
I've installed a CRM program. the installation is successful but when i tried to run the report an error "physical database not found" occured." I have included all the possible dll's that is needed in the package but still its not working.
what should I do? please help.
geboy
|
|
|
|
|
why dont you use crystal instead. heres the function. hope this would help
Sub CreateReport(SQL As String, MyConnection As Connection, ReportPath As String, _
ReportTitle As String, OpenMethod As Integer)
Dim crApp As New CRAXDRT.Application
Dim crRep As New CRAXDRT.Report
Dim Rs As New ADODB.Recordset
On Error GoTo Err_Proc
With Rs
.CursorLocation = adUseClient
.Open SQL, MyConnection, adOpenKeyset, adLockReadOnly
.ActiveConnection = Nothing
If .RecordCount > 0 Then
Set crRep = crApp.OpenReport(ReportPath, OpenMethod)
crRep.Database.SetDataSource Rs
' crRep.Database.LogOnServer "C:\SUKI\Support\crystal\Pdlsql.dll", gStrServer, gStrDatabase
crRep.ReportTitle = ReportTitle
With frmReportViewer
.Caption = crRep.ReportTitle
.WindowState = vbMaximized
.CRViewer.ReportSource = crRep
If OpenMethod = 0 Then 'print directly to printer
crRep.PrintOut False, 1, True
Else
.CRViewer.ViewReport '1=show print layout to user
.Show vbModal
End If
End With
Else
MsgBox "Record(s) not found.", vbExclamation, App.Title
End If
.Close
End With
Set Rs = Nothing
Set crRep = Nothing
Set crApp = Nothing
Exit Sub
Err_Proc:
Call ErrMsg
End Sub
geboy
|
|
|
|
|
do you mean linking your adodc to crystal or still in data report?
when closing your report make sure that the object is destroyed like in recordset where we issue "set rs = nothing"
then before opening your report refresh your adodc then
set your datareport as new datareport. likethis
Dim rep as datareport
set rep = new report
adodc.refresh
rep.viewreport
sorry cause im not using datareport but this is how i do it in crystal
geboy
|
|
|
|
|
I have VB.NET Project that is Flash game ,I want to click Buttom and play sound along record in Table
I have simple code sound player but I 'nt know to modify with ADO.NET Data Object .
------------------------------------------------------------------------------------------------------------------
simple code play sound
Public Sub Play()
' If a file name has been registered, call WCE_PlaySound,
' otherwise call WCE_PlaySoundBytes.
If Not (m_fileName Is Nothing) Then
WCE_PlaySound(m_fileName, IntPtr.Zero, Fix(Flags.SND_ASYNC Or Flags.SND_FILENAME))
Else
WCE_PlaySoundBytes(m_soundBytes, IntPtr.Zero, Fix(Flags.SND_ASYNC Or Flags.SND_MEMORY))
End If
End Sub
Private Sub btnFile_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnFile.Click
Dim sound As New Sound("Program Files\SoundSample\chord.wav")
sound.Play()
End Sub
-------------------------------------------------------------------------------------------------------------------------------
Thankyou very....
poaj
|
|
|
|
|
Hello all,
Does anyone know how to change a folders icon programatically? I want to be able to replace a folders icon when I click a button.
Thanks!
|
|
|
|
|
I believe the icon for a folder is set by a config file inside the folder. Sorry, I don't recall the details, but assuming I am right, creating/changing that file would be what's needed.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
OK, got it. You need to create a system file called Desktop.ini inside the folder. Here are the contents of the one I created:
[.ShellClassInfo]
IconFile=%SystemRoot%\system32\SHELL32.dll
IconIndex=11
You can right click on a folder and set it's icon, then you need to go into the folder and specify you want to see hidden system files, in order to see the desktop.ini file.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
Hi,
I am developing a vb.net cinema ticket booking system. The application is to have the option to let the user to choose which language he wants the application interface to be in. (Either English or Mandrain)
How should I go about changing the language to display?
|
|
|
|
|
I wrote a very simple program that has a sort off similarity.
I made custom controls that access background files that are changeable by another part of the program to more languages or correct spelling mistakes.
Control <----->Class <-------> File: XML/DB(Any type that u can use):confused:
In the Database the tables will look something like this
<code>Language </code>1:Many <code>Caption </code> Many:1 <code>Words</code>(Default Language) :confused: X|
I linked the captions to the system settings file for faster and user diffraction settings for different users and machines.
Hope it helps; Basic fast and relaible
|
|
|
|
|
Do not make custom controls or something like that. All major software products are localized, and hence multi lingual applications are obviously supported by the framework. Unfortunately it's made a bit goofy, but it is still better than a custom solution (as the translation tools work around the goofiness - more or less).
Search for "localization" on Google, here on Codeproject etc for information on how to do it for WinForms, ASP.NET (1.1 and 2.0 differs a bit - most of it is manual in ASP.NET 1.1).
|
|
|
|
|
i need to know how can i make automatic languages translation to my application, for exaple caption on labes and command button, messages etc...
Magno R Vasquez (Gbyte)
|
|
|
|
|
You can get some childish translation though various commercial packages (no, I can't give examples, I have not looked at this for years and you can google "machine translation" as well as I can). They can be useful if you need the user to get an understanding what the text PROBABLY means, nothing more. You might get a semi decent result if you are in a VERY restricted domain (for example it knows all words are related to cars, manufactoring, weather, etc). For anything else, you can just hope the users find the text so amusing that they laugh instead of hunting you down and killing you.
|
|
|
|
|
I have a scenario where the program needs to have a variable connection string for the SQL server.
The string is combined a collection of:
• ServerName
• SqlDatabase Name
• User Name
• Password
• Connection Timeout Value
Every time the connection string change it needs to validate the string and other operations needs to run.
The problem comes in when the connection string has incorrect information.
I have tried multi threads as I want the users to continue working on other functions while the system test the connection, but if the connection string generate an error it overpower all the threads and stall the system in any case…
Is there a better why and faster why to test the connection, with out letting the user/system wait for response SQL connection timeout?
PS: Reducing the timeout doesn’t help as the network has at certain times slow response times.
This all happens in RunTime...
****************************************************************************
I am not english so leave my grammer and spelling alone...
****************************************************************************
|
|
|
|
|
I'm not sure if it is faster, but you could test the SQL connection by using a Try/Catch block to see if the connection can be opened before you actually use the connection. It would look something like this:
Try
iconn.Open()
boolReturn = True
Catch ex As OleDb.OleDbException
boolReturn = False
Catch ex As SqlClient.SqlException
boolReturn = False
Catch ex As Odbc.OdbcException
boolReturn = False
Catch ex As Exception
boolReturn = False
Finally
'Always close connection
If iconn.State = ConnectionState.Open Then
iconn.Close()
End If
End Try
Hope this helps.
|
|
|
|
|
I am testing the connection string by opening it and then closing the connection which has been assigned the function of testing. The problem comes in when u open the connection and the server is not there.
It stalls the whole system for 30 seconds (Default Time out).
Try
_conn.ConnectionString = ReconfigConnString() </Code>‘Function that returns a complete connection string<Code>
_conn.open </Code>‘<---- Here the system will stay until time out.<Code>
Catch ex as Exception
</Code>‘Do error handeling<Code>
Finally
_conn.close
End Try
I am looking for an idea where the system can test the connection AND do the other functions that needs to be complete before the form close.
In multi threading the connection thread will over power the other threads and will cause one of two things. Deadlocks or either full system stalling until time out.
System complete...bug free?
I'll find a bug.
|
|
|
|
|
Ok i have listbox and text box...
If i type in textbox "Hell" then i want that it selects the first item in listbox that contains word "Hell" in item.
So i go search...
---------------------
| Hell | Search
---------------------
Now i want that is selected first item that contains the word i searched...
----------------------------
| 32- Worms 2 |
| 33- Worms 3 |
| 34- Sims Vocation |
| 35- Heaven and Hell | <- Selected
| 36- 4x4 Evolution |
----------------------------
Then i search again...
---------------------
| Hell | Search for next
---------------------
Then i get other one that contains the searched world...
----------------------------
| 67- Max Payne2 |
| 68- Return to Hell | <- Selected
| 69- Red Faction2 |
| 70- Civilization3 |
| 71- Captain Claw |
----------------------------
If annyone knows how to do that please answer me please, please, please....
Thanks
|
|
|
|
|
I hope this is usefull.
Private Function Search(ByVal _Listbox As ListBox, ByVal SearchText As String)
Dim i As Integer</code>
' Loop thru all the items
<code>For i = 0 To _Listbox.Items.Count - 1</code>
' Use the basic string contains function and compare the two strings
<code>If _Listbox.Items.Item(i).ToString().Contains(SearchText) Then</code>
'in the if statement u can have multible out puts
' _ArrayList.Add(_Listbox.Items.Item(i).ToString())
'TIP: Remenber to check for duplicates at this stage.
<code>Return _Listbox.Items.Item(i).ToString()
End If
Next</code>
' Return _ArrayList
<code> Return Nothing
End Function
Very simple, but it Works.... sometimes;P
|
|
|
|
|
not working buth thanks...
|
|
|
|
|
Devenv.exe gets corrupted often results in the Eroor in Design page.
How to solve this?
Rekha
|
|
|
|