|
The previous post showed you how to do it, use a larger number for font size.
|
|
|
|
|
Width/height ratio of a char is fixed. If you make it "higher", you also make it "wider".
You could draw the string on a canvas, and copy that part of the image to another image with the same width, larger height, and stretch it.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
hello i want to run a text file with my audio file how?
|
|
|
|
|
Your question makes no sense at all.
Are you saying that you want to take a text file and run it through a text-to-speech engine in the application that you're writing?
|
|
|
|
|
the sample class
public class Foo{
public string Name {get;set;}
public bool IsLocked {get;set;}
public double LockID {get;set;}
}
and i have this method
public dictionary<string, object> GetSettings()
{
return somethig;
}
then when i access it like this
var sample = new Foo();
var prop = sample.GetType();
foreach(var item in GetSettings())
{
prop.GetProperty(item.key, BindingFlags.public | BindingFlags.Instance).SetValue(prop, item.Value, null)
}
then i got an exception "Object does not match target type"
I cant find any solution on the web
I will appreciate for any advice will come
thank you
|
|
|
|
|
Means that the type which the property expects is different from the type you are putting in there.
You've got a lot going on in a single line of reflection, I'd recommend to break it up in atomic statements; first get the property and put that in a PropInfo. Check if you found it, and then assign a value. Makes debugging a lot easier.
By the looks, I'd say the the boolean and the double are being fed strings.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I just discard the reflection, i found no benefit using the reflection for that method other than writing a less code.
|
|
|
|
|
hi all, i created a login form/pos system, so far its goin good yet somehow i did something wr0ng, everything works perfectly and then all of a sudden i get a message (paste it below) yet i didnt make any changes or nothing
error: i get 2 errors and 10 warnings
------""" Could not copy "obj\Debug\login form.exe" to "bin\Debug\login form.exe". Beginning retry 1 in 1000ms. The process cannot access the file 'bin\Debug\login form.exe' because it is being used by another process. login form""""""""""---------- although it states its used by another program-it isnt any ideas?
I Checked in the task manager under processes tab / nothing there of login form.exe
|
|
|
|
|
Are you sure you haven't left something running in the background - e.g. stopping the program in the debugger and then trying to run it again?
Try closing Visual Studio and opening it again. Try Cleaning the project - or manually deleting the contents of the bin\Debug (or bin\Release) folder
|
|
|
|
|
nope , killed all processes, tried cleaning , if i restart its fixed until i debug / run it more than 2 times, so it somehow stays open while hiding itself i guess, because in the task manager theres nothing, neither in processes
|
|
|
|
|
Is it using a resource that isn't being disposed of properly?
|
|
|
|
|
im still new to most of this, how would i check to see if its using a resource thats not disposed of properly??
|
|
|
|
|
Review your code
For example, have you opened a connection to a database without using using or closing the connection when you're finished with it? Ditto using Excel/Word via interop.
The only other thing I can suggest is comment out tracts of code, prove the problem has gone away, then uncomment a section, run again ... repeat until the problem re-occurs and you will have at least located the section causing the issue.
There was a version of VS I used a few years ago that kept leaving the vhost in Task Manager - I had a pre-compile step that killed the process. The problem went away after the latest patches were applied, so make sure you have applied all of the patches (if any) for your version of VS
|
|
|
|
|
thanks ill get back to double checking right away and ill also check for available patches. thanks alot,also im using the VS 2015 RC edition if thats worth something 
|
|
|
|
|
Far more recent than the version that gave me grief In which case, check that code. Good luck
|
|
|
|
|
i fixed it but dont know what is the problem, basicly the program stayed open even after using the red x to close it, so i created a button with the aplication.close(); ,,, its a workaround until i get the real problem
|
|
|
|
|
I get this all the time and assume it is a bug in VS, closing VS usually clears the connection. It is a PITA but I live with it!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi i want to create a inventory management system,
my problem is in sql server 2012 , i created a database, i created a table named
products(varchar (50))
in my form c# i have a quantity/name/code/cost price/sell price / and a add button, how do i get those datastructure into sqls
|
|
|
|
|
jamesmc1535 wrote: i created a table named products(varchar (50)) That is not the way to create tables. A table should contain columns which relate to the data items, i.e. quantity/name/code/cost price/sell price etc. There are many samples and tutorials at http://www.codeproject.com/Chapters/4/Database.aspx[^] which will help you.
|
|
|
|
|
I think you're asking for the statements that go in SQL?
If so, there's an easier way to create a database in SQL server.
1. In object explorer,Simply right click on "Databases"
2. Select "New database"
3. Give it a name then click ok
4. Thereafter, expand the databases folder in object explorer to find the db you created.
5. Expand your db and right click on"Tables" to add your tables.
Hope this helps
|
|
|
|
|
Hi,
I've got here a project for a lab-test software for internal use, which has a lot of buttons. It has a main form and some tabs which all have a lot of elements. This results in a lot of event handlers in one file.
Is there any good method to devide this (I thought about a file for every tab )? I tried this with partial class and it did compile (couldn't test if it also really would work) but when trying to jump to one of the handlers in the code editor it always jumps to the original file and sometimes even creates a new empty handler, that's why I dought that it really works.
I don't want to reduce the number of buttons, it is the easiest way of triggering a function also for untrained personnel.
Any hint to this ?
Thanks very much
|
|
|
|
|
The way I would do it is to create a UserControl for each tab page - that way, the number of controls on the main page is reduced to the minimum, and the interactions between the various controls become more rigid and defined - which helps a heck of a lot with maintenance.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I am trying to create a TableAdapter in a DataSet using the "table Adapter Configuration Wizard" in Visual Studio 2010. I am connecting though ODBC connection[DSN connection], the SQL query runs fine but the fill method is showing error "HY010[ODBC][ORACLE] Function Sequence Error".
But When I am doing same thing using Oracle client connection then it works fine but since its deprecated, i want to use ODBC.
Any help is much appreciated.
|
|
|
|
|
Why do you want to use ODBC? It's a generic and unoptimized method for getting at databases. Being generic, you lose the performance benefits of using a direct client and you also lose database engine specific functionality.
Member 11762295 wrote: But When I am doing same thing using Oracle client connection then it works fine but since its deprecated, i want to use ODBC.
What is deprecated? ODP.NET? No, it's not.
|
|
|
|
|
Dave Kreskowiak wrote: What is deprecated?
Microsoft's Oracle client (System.Data.OracleClient ) is deprecated:
The types in System.Data.OracleClient are deprecated and will be removed in a future version of the .NET Framework.
As you say, ODP.NET[^] is still supported. It's even available on NuGet:
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|